package com.example.SES;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.util.ResourceUtils;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@ComponentScan("my.*") 
public class SesDemoApplication extends  WebMvcConfigurationSupport {

	@Override
	protected void addResourceHandlers(ResourceHandlerRegistry registry) {
		//这是配置模板页面的路径  配置文件里面已经配置了  所以这里暂时不需要
				//这是是配置静态资源文件的路径
				registry.addResourceHandler("/static/**").addResourceLocations(ResourceUtils.CLASSPATH_URL_PREFIX + "/static/");
				super.addResourceHandlers(registry);
	}
	
	public static void main(String[] args) {
		SpringApplication.run(SesDemoApplication.class, args);
	}

}
